/*
 * @Date: 2023-04-11 15:24:34
 * @LastEditors: wkl
 * @LastEditTime: 2023-04-11 15:36:28
 * @FilePath: /demo/demo2/app.js
 */
import MsgReader from '@kenjiuno/msgreader';
console.log(MsgReader)
import * as fs from 'fs'

let readMail = () => {
    var readFileAsBuffer = fs.readFileSync('./1.msg');
    var msgReader = new MSGReader.default(readFileAsBuffer);
    var fileData = msgReader.getFileData();
    //FileData will have body, subject etc
    var getBody = fileData.body;
    console.log(getBody)
}
readMail()